#!/usr/bin/env bash

systemctl enable kubelet

if  kubeadm init --config=kubeadm-config.yaml --upload-certs  > kubeadm-init.log 2>&1
then
   echo "$(date) ----kubeadm init is successful----"
   echo "$(date) kubeadm init ok"  >>  kubeadm-init.log
else
   echo "$(date) ----kubeadm init is failed----"
   echo "$(date) kubeadm init failed"  >> kubeadm-init.log
fi

